<template>
	<div class="noticeContent">
		<div class="haveContent" v-if="noticeList.length>0">
			<div class="list">
				<div 
					class="item" 
					v-for="(item,index) in noticeList" :key="index"
					@click="goToPage({
						path:`/generalUser/notice/noticeDetail`,
						navType:`push`,
						params:{
							id:item._id,
							title:item.title
						}
					})"
				>
					<div class="iconBox">
						<div class="iconBk">
							<uni-icons type="sound" size="30" color="#fff" class="noticeIcon"></uni-icons>
						</div>
					</div>
					<div class="content">
						<div class="title">
							<div class="cont">{{ item.title }}</div>
							<div class="time">{{ formatTime(item.publish_date) }}</div>
						</div>
						<div class="desc">
							{{ item.excerpt }}
						</div>
					</div>
				</div>
			</div>
			<div class="load-more">
				<uni-load-more 
					iconType="circle" 
					status="noMore" 
					:content-text="{
						contentdown: '上拉加载更多公告',
						contentrefresh: '正在加载，请稍后...',
						contentnomore: '----- 暂无更多公告啦 -----'
					}"  
				/>
			</div>
		</div>
		<div class="noDataBox centerFixed" v-else>
			<div class="noDataBorder">
				<image src="~@/static/images/nodata.png" class="nodataPic"/>
			</div>
			<div class="noDataTips">
				暂无更多公告啦
			</div>
		</div>
	</div>
</template>

<script lang="ts" src="./notice.ts"></script>

<style lang="stylus" scoped>
@import './notice.styl';
</style>
